<?php
class M_singleproduct extends CI_Model{
	function __construct(){
		parent::__construct();
	}
	function get_detailproduct($product_id){
		$kuery = "SELECT * FROM m_produk 
			left join m_kategori on produk_kategori = kategori_id
			where produk_id = '". $product_id ."' LIMIT 0,1";
		$query = $this->db->query($kuery);
		$num_rows = $query->num_rows();
		if($num_rows > 0){
			$result = $query->row();
		}else{
			$result = "0";
		}
		return $result;
	}
}
?>